package ggg;

public class gfggf {
    public static void main(String[] args) {
        System.out.println(wordReverse("adc-1de/fg"));
    }
    public static  String wordReverse (String inputStr){
        //String str = "adc-1de/fg";
        String[] split = inputStr.split("-1");

        StringBuffer s1 = new StringBuffer(split[0]);
        s1=s1.reverse();

        String[] split2 = split[1].split("/");
        StringBuffer s2 = new StringBuffer(split2[0]);
        s2=s2.reverse();
        StringBuffer s3 = new StringBuffer(split2[1]);
        s3=s3.reverse();

        String s = new String(s1 + "-1" + s2 + "/" + s3);
        return s;
    }
}
